// Persistence Of Vision raytracer version 3.5 sample file.
// POV-Ray scene description for chess board.
// By Ville Saari
// Copyright (c) 1991 Ferry Island Pixelboys
//
// This scene has 430 primitives in objects and 41 in bounding shapes and
// it takes over 40 hours to render by standard amiga.
//
// If you do some nice modifications or additions to this file, please send
// me a copy. My Internet address is:  vsaari@niksula.hut.fi
//
// -w320 -h240
// -w800 -h600 +a0.3

// Note : CHESS2.POV was created from Ville Saari's chess.pov
// -- Dan Farmer 1996
//  - Cchanged textures
//  - Added camera blur and changed focal length
//  - Use sky sphere
//  - Modularized the code
//  - Added felt pads to bottom of pieces

// remaining manual bounding commented out by Bob Hughes, August 31, 2001


global_settings { assumed_gamma 2.2 max_trace_level 5 }

#include "shapes.inc"
#include "colors.inc"
#include "textures.inc"
#include "skies.inc"
#include "metals.inc"
#include "woods.inc"

#declare FB_Quality_Off     =  0;
#declare FB_Quality_Fast    =  1;
#declare FB_Quality_Default =  2;
#declare FB_Quality_High    =  3;

#declare FB_Quality= 5;

camera {
   location <0, 132, 0>
   direction <0, 0, 2>
   up <0, 1, 0>
   right <4/3, 0, 0>
   look_at <0, 0, 0>


}
   
   
 //  light_source {
//  <40, 4, -30> color White
//  area_light <0, 3, 0>, <0, 0, 3>, 7, 1
//}
light_source { <0, 600, 0> colour White }



#declare Table =
union {
   intersection {
      plane { +y, -3 }
      plane { -y,  8 }
      sphere { <0, -5.5, 0>, 55 }
   }

   intersection {
      plane { y, -8 }
      object {
         Hyperboloid_Y
         scale <10, 20, 10>
         translate -20*y
      }
   }

   pigment {
      granite
      scale 6
   }
   finish {
      specular 1
      roughness 0.02
      reflection 0.3
   }
}
                      
#declare CutSize = 0.4;
#declare BSize = 77;
#declare PSIZE = 0.8;
#declare Index = -32;                      
#declare  Brd = difference
{ 
box 
{ <-BSize,    -12    ,-BSize>, 
   < BSize,     1  ,   BSize>    
    texture {     T_Wood7     }   
 }     
  
  
#declare Index = -32;
#while(Index <= 32) 
     cylinder { <Index, 1, 32+CutSize>, <Index, 1, -32-CutSize>, CutSize  texture { T_Wood5 } }  
     cylinder { <32+CutSize, 1, Index>, <-32-CutSize, 1, Index>, CutSize  texture { T_Wood5 } }
#declare Index = Index + 8;     
  #end  
  
      
        
       
#declare Index = 38;
#while(Index <= 49) 
    
           cylinder { <Index,1,33>, <Index,1,-15>, 5  }  
    
#declare Index = Index + 1;                    
#end                       
                        
 texture {     T_Wood7  } 
 
 }
                       
     
union{     
       
object {   Brd     }

//translate <-20.0, 0.0, 6.0>  // <dX, dY, dZ>
 //}                     
     
     
             
  cone
    {
        <0,0,0>, 0.8, <0,1-CutSize/2,0>, PSIZE
       texture { T_Wood2}
    } 
cone
    {
        <-16,0,16>, 0.8, <-16,0.8,16>, PSIZE
       texture { T_Wood2}
    }   
    
    cone
    {
        <16,0,16>, 0.8, <16,0.8,16>, PSIZE
       texture { T_Wood2}
    }    
    
       cone
    {
        <-16,0,-16>, 0.8, <-16,0.8,-16>, PSIZE
       texture { T_Wood2}
    }  
          cone
    {
        <16,0,-16>, 0.8, <16,0.8,-16>, PSIZE
       texture { T_Wood2}
    }    
           translate <-11.0, 0.0, 0.0>  // <dX, dY, dZ>
    }
       
 //                          
//cylinder { <32, 32, 32>, <-32, 32, -32>, 1 
//pigment { checker rgb 0.75, rgb 0.25 scale 5.2 }
//}    

                       
                     
//object { Pieces }
//object { Board }
//object { Frame }
//object { Ground }
//object { Table }
//sky_sphere { SkySphere }        

    
 